package com.alinesno.cloud.base.logger.entity;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Transient;

/**
 * <p>
 * 服务器状态
 * </p>
 *
 * @author WeiXiaoJin
 * @since 2020-01-26 09:30:11
 */
@Entity
@Table(name = "log_system_status")
public class LogSystemStatusEntity extends BaseWatcherEntity {

	private static final long serialVersionUID = 1L;
	
	/**
	 * 核心数
	 */
	@Column(name = "cpu_num")
	private Integer cpuNum;
	/**
	 * CPU使用率
	 */
	@Column(name = "cpu_total")
	private Double cpuTotal;
	/**
	 * CPU系统使用
	 */
	@Column(name = "cpu_sys")
	private Double cpuSys;
	/**
	 * CPU用户使用率
	 */
	@Column(name = "cpu_used")
	private Double cpuUsed;
	/**
	 * CPU当前等待率
	 */
	@Column(name = "cpu_wait")
	private Double cpuWait;
	/**
	 * CPU当前空闲率
	 */
	@Column(name = "cpu_free")
	private Double cpuFree;
	/**
	 * JVM内存总数
	 */
	@Column(name = "jvm_total")
	private Double jvmTotal;
	/**
	 * JVM最大可用内存总数
	 */
	@Column(name = "jvm_max")
	private Double jvmMax;
	/**
	 * JVM空闲内存
	 */
	@Column(name = "jvm_free")
	private Double jvmFree;
	/**
	 * JDK版本
	 */
	@Column(name = "jvm_version")
	private String jvmVersion;
	/**
	 * JDK路径
	 */
	@Column(name = "jvm_home")
	private String jvmHome;

	/**
	 * jvm名称
	 */
	@Column(name = "jvm_name")
	private String jvmName;

	/**
	 * jvm运行时间 
	 */
	@Column(name = "jvm_run_time")
	private String jvmRunTime;

	/**
	 * jvm启动时间 
	 */
	@Column(name = "jvm_start_time")
	private String jvmStartTime;

	/**
	 * JVM使用率
	 */
	@Column(name = "jvm_usage")
	private double jvmUsage;

	/**
	 * 内存总量
	 */
	@Column(name = "mem_total")
	private Double memTotal;
	/**
	 * 已用内存
	 */
	@Column(name = "mem_used")
	private Double memUsed;
	/**
	 * 剩余内存
	 */
	@Column(name = "mem_free")
	private Double memFree;

	/**
	 * 已使用内存
	 */
	@Column(name = "mem_usage")
	private Double memUsage;

//	/**
//	 * 盘符路径
//	 */
//	@Column(name = "file_dir_name")
//	private String fileDirName;
//	/**
//	 * 盘符类型
//	 */
//	@Column(name = "file_type_name")
//	private String fileTypeName;
//	/**
//	 * 总大小
//	 */
//	@Column(name = "file_total")
//	private String fileTotal;
//	/**
//	 * 剩余大小
//	 */
//	@Column(name = "file_free")
//	private String fileFree;
//	/**
//	 * 已使用量
//	 */
//	@Column(name = "file_used")
//	private String fileUsed;

	/**
	 * 使用率
	 */
	@Column(name = "file_usage")
	private Double fileUsage;
	/**
	 * 服务器名称
	 */
	@Column(name = "server_name")
	private String serverName;
	/**
	 * 服务器IP
	 */
	@Column(name = "server_ip")
	private String serverIp;
	/**
	 * 项目路径
	 */
	@Column(name = "server_user_dir")
	private String serverUserDir;
	/**
	 * 操作系统
	 */
	@Column(name = "server_os_name")
	private String serverOsName;

	/**
	 * 操作系统结构
	 */
	@Column(name = "server_os_arch")
	private String serverOsArch ;

	@Transient
	private List<LogSystemFilesEntity> files;

	public List<LogSystemFilesEntity> getFiles() {
		return files;
	}

	public void setFiles(List<LogSystemFilesEntity> files) {
		this.files = files;
	}

	public String getServerOsArch() {
		return serverOsArch;
	}

	public void setServerOsArch(String serverOsArch) {
		this.serverOsArch = serverOsArch;
	}

	public Double getMemFree() {
		return memFree;
	}

	public void setMemFree(Double memFree) {
		this.memFree = memFree;
	}

	public Double getMemUsage() {
		return memUsage;
	}

	public void setMemUsage(Double memUsage) {
		this.memUsage = memUsage;
	}

	public String getJvmName() {
		return jvmName;
	}

	public void setJvmName(String jvmName) {
		this.jvmName = jvmName;
	}

	public String getJvmRunTime() {
		return jvmRunTime;
	}

	public void setJvmRunTime(String jvmRunTime) {
		this.jvmRunTime = jvmRunTime;
	}

	public String getJvmStartTime() {
		return jvmStartTime;
	}

	public void setJvmStartTime(String jvmStartTime) {
		this.jvmStartTime = jvmStartTime;
	}

	public double getJvmUsage() {
		return jvmUsage;
	}

	public void setJvmUsage(double jvmUsage) {
		this.jvmUsage = jvmUsage;
	}

	public Integer getCpuNum() {
		return cpuNum;
	}

	public void setCpuNum(Integer cpuNum) {
		this.cpuNum = cpuNum;
	}

	public Double getCpuTotal() {
		return cpuTotal;
	}

	public void setCpuTotal(Double cpuTotal) {
		this.cpuTotal = cpuTotal;
	}

	public Double getCpuSys() {
		return cpuSys;
	}

	public void setCpuSys(Double cpuSys) {
		this.cpuSys = cpuSys;
	}

	public Double getCpuUsed() {
		return cpuUsed;
	}

	public void setCpuUsed(Double cpuUsed) {
		this.cpuUsed = cpuUsed;
	}

	public Double getCpuWait() {
		return cpuWait;
	}

	public void setCpuWait(Double cpuWait) {
		this.cpuWait = cpuWait;
	}

	public Double getCpuFree() {
		return cpuFree;
	}

	public void setCpuFree(Double cpuFree) {
		this.cpuFree = cpuFree;
	}

	public Double getJvmTotal() {
		return jvmTotal;
	}

	public void setJvmTotal(Double jvmTotal) {
		this.jvmTotal = jvmTotal;
	}

	public Double getJvmMax() {
		return jvmMax;
	}

	public void setJvmMax(Double jvmMax) {
		this.jvmMax = jvmMax;
	}

	public Double getJvmFree() {
		return jvmFree;
	}

	public void setJvmFree(Double jvmFree) {
		this.jvmFree = jvmFree;
	}

	public String getJvmVersion() {
		return jvmVersion;
	}

	public void setJvmVersion(String jvmVersion) {
		this.jvmVersion = jvmVersion;
	}

	public String getJvmHome() {
		return jvmHome;
	}

	public void setJvmHome(String jvmHome) {
		this.jvmHome = jvmHome;
	}

	public Double getMemTotal() {
		return memTotal;
	}

	public void setMemTotal(Double memTotal) {
		this.memTotal = memTotal;
	}

	public Double getMemUsed() {
		return memUsed;
	}

	public void setMemUsed(Double memUsed) {
		this.memUsed = memUsed;
	}

//	public Double getMenFree() {
//		return menFree;
//	}
//
//	public void setMenFree(Double menFree) {
//		this.menFree = menFree;
//	}
//
//	public String getFileDirName() {
//		return fileDirName;
//	}
//
//	public void setFileDirName(String fileDirName) {
//		this.fileDirName = fileDirName;
//	}
//
//	public String getFileTypeName() {
//		return fileTypeName;
//	}
//
//	public void setFileTypeName(String fileTypeName) {
//		this.fileTypeName = fileTypeName;
//	}
//
//	public String getFileTotal() {
//		return fileTotal;
//	}
//
//	public void setFileTotal(String fileTotal) {
//		this.fileTotal = fileTotal;
//	}
//
//	public String getFileFree() {
//		return fileFree;
//	}
//
//	public void setFileFree(String fileFree) {
//		this.fileFree = fileFree;
//	}
//
//	public String getFileUsed() {
//		return fileUsed;
//	}
//
//	public void setFileUsed(String fileUsed) {
//		this.fileUsed = fileUsed;
//	}

	public Double getFileUsage() {
		return fileUsage;
	}

	public void setFileUsage(Double fileUsage) {
		this.fileUsage = fileUsage;
	}

	public String getServerName() {
		return serverName;
	}

	public void setServerName(String serverName) {
		this.serverName = serverName;
	}

	public String getServerIp() {
		return serverIp;
	}

	public void setServerIp(String serverIp) {
		this.serverIp = serverIp;
	}

	public String getServerUserDir() {
		return serverUserDir;
	}

	public void setServerUserDir(String serverUserDir) {
		this.serverUserDir = serverUserDir;
	}

	public String getServerOsName() {
		return serverOsName;
	}

	public void setServerOsName(String serverOsName) {
		this.serverOsName = serverOsName;
	}

	@Override
	public String toString() {
		return "LogSystemStatusEntity{" + "cpuNum=" + cpuNum + ", cpuTotal=" + cpuTotal + ", cpuSys=" + cpuSys
				+ ", cpuUsed=" + cpuUsed + ", cpuWait=" + cpuWait + ", cpuFree=" + cpuFree + ", jvmTotal=" + jvmTotal
				+ ", jvmMax=" + jvmMax + ", jvmFree=" + jvmFree + ", jvmVersion=" + jvmVersion + ", jvmHome=" + jvmHome
				+ ", memTotal=" + memTotal + ", memUsed=" + memUsed + ", memFree=" + memFree + ", fileDirName="
//				+ fileDirName + ", fileTypeName=" + fileTypeName + ", fileTotal=" + fileTotal + ", fileFree=" + fileFree
//				+ ", fileUsed=" + fileUsed + ", fileUsage=" + fileUsage + ", serverName=" + serverName + ", serverIp="
				+ serverIp + ", serverUserDir=" + serverUserDir + ", serverOsName=" + serverOsName + "}";
	}
}
